Beginning CSS Preprocessors: With SASS, Compass.js and Less.js by Anirudh Prabhu

Beginning CSS Preprocessors: With SASS, Compass.js and Less.js by Anirudh Prabhu

Author:Anirudh Prabhu [Anirudh Prabhu]
Language: eng
Format: epub, pdf
Tags: Web, User Interfaces, Computers, Design, Web Development, Information Technology, Web Programming
ISBN: 1484213483
Google: wIZNCwAAQBAJ
Amazon: B01JCOGEDQ
Publisher: Apress
Published: 2015-12-28T00:00:00+00:00


Listing 4-15. Example Demonstrating Lazy Load in Variables

.container {

font-size: @size;

}

@size: 12px;

Listing 4-16. Output of Listing 4-15

.container {

font-size: 12px;

}

With release of Less version 1.7, it is possible store groups of properties in a variable. The code should be placed between brackets just like with a mixin. This can be called ruleset, as shown in Listing 4-17.

Listing 4-17. Example Demonstrating Storing and Using Rulesets

@disclaimer-ruleset: { color: #CCC; font-size: 10px; };

.disclaimer {

@disclaimer-ruleset();

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.